home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / gcc / gcc261c.zoo / objects / elt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-18  |  1.7 KB  |  57 lines

  1. /* Definition of elt union, a union of various primitive C types
  2.    Copyright (C) 1993,1994 Free Software Foundation, Inc.
  3.  
  4.    Written by:  R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
  5.    Date: May 1993
  6.  
  7.    This file is part of the GNU Objective C Class Library.
  8.  
  9.    This library is free software; you can redistribute it and/or
  10.    modify it under the terms of the GNU Library General Public
  11.    License as published by the Free Software Foundation; either
  12.    version 2 of the License, or (at your option) any later version.
  13.    
  14.    This library is distributed in the hope that it will be useful,
  15.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17.    Library General Public License for more details.
  18.  
  19.    You should have received a copy of the GNU Library General Public
  20.    License along with this library; if not, write to the Free
  21.    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22. */ 
  23.  
  24. #ifndef __elt_h_INCLUDE_GNU
  25. #define __elt_h_INCLUDE_GNU
  26.  
  27. #include <objc/objc.h>
  28.  
  29. /* Uncomment this #define to include double's if you really need them, 
  30.    but on most architectures you'll be increasing sizeof(elt) by a 
  31.    factor of two! */
  32.  
  33. /* #define ELT_INCLUDES_DOUBLE 1 */
  34. /* NOTE:  This doesn't work yet. */
  35.  
  36. typedef union _elt
  37. {
  38.   id id_u;
  39.   SEL SEL_u; 
  40.   int int_u;
  41.   unsigned int unsigned_int_u;
  42.   char char_u;
  43.   unsigned char unsigned_char_u;
  44.   short int short_int_u;
  45.   unsigned short int unsigned_short_int_u;
  46.   long int long_int_u;
  47.   unsigned long int unsigned_long_int_u;
  48.   float float_u;
  49. #if (ELT_INCLUDES_DOUBLE)
  50.   double double_u;
  51. #endif
  52.   const void *void_ptr_u;
  53.   char *char_ptr_u;        /* change this to const char * */
  54. } elt;
  55.  
  56. #endif /* __elt_h_INCLUDE_GNU */
  57.